import request from '@/utils/request'

const api = {
  page: '/quickReply/page',
  quickReply: '/quickReply'
}

export function getReply (parameter) {
  return request({
    url: api.page,
    method: 'get',
    params: parameter
  })
}

export function saveReply (parameter) {
  return request({
    url: api.quickReply,
    method: parameter.id === 0 ? 'post' : 'put',
    data: parameter
  })
}

export function deleteReply (parameter) {
  return request({
    url: api.quickReply + `/${parameter.id}`,
    method: 'delete'
  })
}

// 预览文件
export function previewFile(params) {
  return request({
    url: `/declarationInfo/getAllFileV2`,
    method: "get",
    params
  });
}